<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 权限分组表 基类
 * @Entity
 * @Table(name="fa_auth_group_access", id={"uid", "group_id"})
 * @DDL("CREATE TABLE `fa_auth_group_access` (
  `uid` int(10) unsigned NOT NULL COMMENT '会员ID',
  `group_id` int(10) unsigned NOT NULL COMMENT '级别ID',
  UNIQUE KEY `uid_group_id` (`uid`,`group_id`),
  KEY `uid` (`uid`),
  KEY `group_id` (`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='权限分组表'")
 * @property int $uid 会员ID
 * @property int $groupId 级别ID
 */
abstract class AuthGroupAccessBase extends Model
{
    /**
     * 会员ID
     * uid
     * @Column(name="uid", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=false)
     * @var int
     */
    protected $uid;

    /**
     * 获取 uid - 会员ID
     *
     * @return int
     */ 
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * 赋值 uid - 会员ID
     * @param int $uid uid
     * @return static
     */ 
    public function setUid($uid)
    {
        $this->uid = $uid;
        return $this;
    }

    /**
     * 级别ID
     * group_id
     * @Column(name="group_id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=1, isAutoIncrement=false)
     * @var int
     */
    protected $groupId;

    /**
     * 获取 groupId - 级别ID
     *
     * @return int
     */ 
    public function getGroupId()
    {
        return $this->groupId;
    }

    /**
     * 赋值 groupId - 级别ID
     * @param int $groupId group_id
     * @return static
     */ 
    public function setGroupId($groupId)
    {
        $this->groupId = $groupId;
        return $this;
    }

}
